<%@ page pageEncoding="UTF-8" contentType="text/html; charset=utf-8"  %>
<%
	String reading = request.getParameter("reading");
	if (reading.equals("")){	
		return;
	}
	String idStr = request.getParameter("id");
	Integer id = new Integer(idStr);
	String title = request.getParameter("title");
	String language = request.getParameter("language");
	String granularity = request.getParameter("granularity");
	String comments = request.getParameter("comments");
	boolean hasWordGranularity = org.languageguide.readings.FormReadingUtil.getGranularityValue(granularity);

	String source = request.getParameter("source");	
	org.languageguide.readings.ReadingManager.editReading(id, reading, title, language, source, hasWordGranularity, comments);
	response.sendRedirect("reading_submit_preview.jsp?id=" + id);
%>